##Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved.##

add_definitions(-DBLAS="AOCL")
add_definitions(-DN_REPEAT=1000)
add_definitions(-DINT_FS="%lld")
add_definitions(-DUINT_FS="%llu")

add_executable(BenchAmaxv bench_amaxv.c)
target_link_libraries(BenchAmaxv debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchAmaxv OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchAmaxv optimized "${LIB_NAME}.lib")

add_executable(BenchAxpbyv bench_axpbyv.c)
target_link_libraries(BenchAxpbyv debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchAxpbyv OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchAxpbyv optimized "${LIB_NAME}.lib")

add_executable(BenchCopyv bench_copyv.c)
target_link_libraries(BenchCopyv debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchCopyv OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchCopyv optimized "${LIB_NAME}.lib")

add_executable(BenchDotv bench_dotv.c)
target_link_libraries(BenchDotv debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchDotv OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchDotv optimized "${LIB_NAME}.lib")

add_executable(BenchGemm bench_gemm.c)
target_link_libraries(BenchGemm debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchGemm OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchGemm optimized "${LIB_NAME}.lib")

add_executable(BenchGemmt bench_gemmt.c)
target_link_libraries(BenchGemmt debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchGemmt OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchGemmt optimized "${LIB_NAME}.lib")

add_executable(BenchGemv bench_gemv.c)
target_link_libraries(BenchGemv debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchGemv OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchGemv optimized "${LIB_NAME}.lib")

add_executable(BenchGer bench_ger.c)
target_link_libraries(BenchGer debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchGer OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchGer optimized "${LIB_NAME}.lib")

add_executable(BenchNrm2 bench_nrm2.c)
target_link_libraries(BenchNrm2 debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchNrm2 OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchNrm2 optimized "${LIB_NAME}.lib")

add_executable(BenchScalv bench_scalv.c)
target_link_libraries(BenchScalv debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchScalv OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchScalv optimized "${LIB_NAME}.lib")

add_executable(BenchSwapv bench_swapv.c)
target_link_libraries(BenchSwapv debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchSwapv OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchSwapv optimized "${LIB_NAME}.lib")

add_executable(BenchSyrk bench_syrk.c)
target_link_libraries(BenchSyrk debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchSyrk OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchSyrk optimized "${LIB_NAME}.lib")

add_executable(BenchTrsm bench_trsm.c)
target_link_libraries(BenchTrsm debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchTrsm OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchTrsm optimized "${LIB_NAME}.lib")

add_executable(BenchTrsv bench_trsv.c)
target_link_libraries(BenchTrsv debug "${LIB_NAME}.lib")
if(ENABLE_OPENMP)
    target_link_libraries(BenchTrsv OpenMP::OpenMP_CXX)
endif()
target_link_libraries(BenchTrsv optimized "${LIB_NAME}.lib")
